﻿@model Exception
@{
    ViewBag.Title = "ERROR";
    Layout = null;
    var logs = HttpContext.Current.Items["BlobServiceLog"] as System.Text.StringBuilder;
    if (logs == null)
    {
        logs = new System.Text.StringBuilder();
    }
}
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@ViewBag.Title</title>
    <link rel="stylesheet" href="~/Content/themes/base/core.css" />
    <link rel="stylesheet" href="~/Content/themes/base/base.css" />
    <link rel="stylesheet" href="~/Content/themes/base/dialog.css" />
    <link rel="stylesheet" href="~/Content/themes/base/theme.css" />
    <link rel="stylesheet" href="~/Content/bootstrap.min.css">
    <link rel="stylesheet" href="~/Content/cloudstoragelight.css?v=20160317B">
    <link rel="shortcut icon" type="image/icon" href="@(Url.Content("~/favicon.ico"))" />

    <script type="text/javascript" src="~/Scripts/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery-ui.min-1.11.1.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery.tmpl.js"></script>
    <script type="text/javascript" src="~/Scripts/cloudstoragelight.js?v=20160317B"></script>

</head>
<body style="overflow:auto;">
    <div id="maindiv">
        <div id="chrome_ctrl_placeholder"></div>
        <div class="container body-content">
            <h1 class="text-danger">@(CloudStorageLight.Core.Web.ViewMessages.MsgErrorMessage)</h1>
            <h3>@(ViewData["Id"] ?? "")</h3>
            @if (Model != null)
            {
                if (Model.GetType().Namespace == "System")
                {
                    <p>@(CloudStorageLight.Core.Web.ViewMessages.MsgGeneral)</p>
                }
                else if (Model is System.Web.Mvc.HttpAntiForgeryException)
                {
                    <p>@(CloudStorageLight.Core.Web.ViewMessages.MsgRetryForSecurity)</p>
                }
                else
                {
                    <p>@(Model == null ? "" : Model.Message)</p>
                }

            }

            <a href="javascript:history.back();">@(CloudStorageLight.Core.Web.ViewMessages.MsgBack)</a>
            <div>
                <h3 id="detail-btn"><a href="#">@(CloudStorageLight.Core.Web.ViewMessages.MsgDetail)</a></h3>
                <div id="detail" style="display:none;">
                    <div>
                        @(Model.ToString()))
                    </div>
                    <hr />
                    <div>
                        @(logs.ToString()))
                    </div>
                </div>
            </div>
        </div>

    </div>
 
    @Html.Partial("_CommonScript")
    <script type="text/javascript">

      $(function() {

          $('#detail-btn').click(function () {
              $('#detail').slideToggle('slow');
          });

      });

    </script>
</body>
</html>




